function logincheck(){
	//检查用户名是否合法
	var name = document.getElementById("uname");
	var namespan=document.getElementById("namespan");
	if(name.value == ""){
		namespan.innerHTML="*用户名不能为空！";
		return false;
	}
	name.style.backgroundColor="#FFF"
	namespan.innerHTML="√";
	
	//检查密码是否合法
	var pwd = document.getElementById("upwd");
	var pwdspan = document.getElementById("pwdspan");
	if(pwd.value == ""){
		pwdspan.innerHTML = "*密码不能为空！";
		return false;
	}
	if((pwd.value).length < 6){
		pwdspan.innerHTML = "*密码长度需大于6";
		return false;
		}
		pwd.style.backgroundColor="#FFF";
	 	pwdspan.innerHTML = "√";
	 	
	//检查两次输入密码是否一致
	var repwd = document.getElementById("upwd_2");
	var pwd_2span = document.getElementById("pwd_2span");
	if(repwd.value != document.getElementById("upwd").value){
		pwd_2span.innerHTML = "两次输入密码不一致，请重新输入！"
		return false;
	}
	repwd.style.backgroundColor="#FFF";
	pwd_2span.innerHTML = "√";
	
	//检查手机号是否合法
	var tel = document.getElementById("phone");
	var reg = /^[1][\d]{10}$/;
	var telspan = document.getElementById("telspan");
	if(!reg.test(tel.value)){
		telspan.innerHTML = "手机号错误！";
		return false;
	}
	tel.style.backgroundColor="#FFF";
	telspan.innerHTML = "√";
	return true;
}
